<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑联系人</title>
<link href="${pageContext.request.contextPath}/css/client/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/admin-all.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap.min.css" />

    <script src="${pageContext.request.contextPath}/js/layui/layui.all.js"></script>
    <script src="${pageContext.request.contextPath}/js/jquery/jquery-3.3.1.js"></script>

    <script type="text/javascript">
        function checkNull() {
            var cus_name = $("#cus_name").val();
            var office_tel = $("#office_tel").val();
            if(cus_name.trim()=="" || office_tel.trim()==""){

                layer.alert("客户姓名和办公电话不允许为空!");
                return false;
            }
            return true;
        }
    </script>
</head>

<body>
<div class="alert alert-info">客户信息管理<b class="tip"></b>客户信息<b class="tip"></b>联系人<b class="tip"></b>编辑联系人 </div>

<form action="upd_contact?type=modify" method="post">
<div class="button_bar">
        <input type="button" class="common_button" onclick="layer.alert('欢迎使用!');" value="帮助"/>
	<input type="button" class="common_button" onclick="window.history.go(-1);" value="返回"/>
	<input type="submit" class="common_button" onclick="return checkNull()" value="保存"/>
</div>
<table class="query_table">
    <tr>
        <th>姓名</th>
        <td><input type="text" id="contact" name="contact" value="${Contact.contact}"/><span class="red_star">*</span></td>
	    <th>性别</th>
        <td>
            <input type="radio" name="gender" value="男" <c:if test="${Contact.gender=='男'}">checked="checked"</c:if> />  男
            <input type="radio" name="gender" value="女" <c:if test="${Contact.gender=='女'}">checked="checked"</c:if> />  女
        </td>
	</tr>
    <tr>
        <th>职位</th>
        <td><input type="text" name="position" value="${Contact.position}"/><span class="red_star">*</span></td>
        <th>办公电话</th>
	    <td><input type="text" id="office_tel" name="office_tel" value="${Contact.office_tel}"/><span class="red_star">*</span></td>
    </tr>
    <tr>
        <th>手机</th>
        <td><input type="text" name="contact_tel" value="${Contact.contact_tel}"/></td>
        <th>备注</th>
        <td><input type="text" name="notes" value="${Contact.notes}" /></td>
    </tr>

    <input type="hidden" id="cid" name="cus_id" value="${Contact.cus_id}"/>
    <input type="hidden" id="id" name="id" value="${Contact.id}"/>
</table>
</form>
</body>
</html>
